package model;

import model.DIRECTION;

public abstract class Figure extends MarioObject{
	
	public DIRECTION dir;
	public boolean moving;
	public boolean movingLeft;
	public boolean movingRight;
	public boolean movingUp;
	int speed;
	boolean canShoot;
	int munitionAmount;
	
	public int jumpAmount = 150;
	public boolean isJumping = false;
	
	public Figure(int x, int y, TYPE type){
		super(x,y,type);
		this.dir=DIRECTION.RIGHT;
		this.moving=false;
		this.speed=0;
		this.canShoot=false;
		this.munitionAmount=0;
		
	}
	
	public DIRECTION getDirection(){
		return this.dir;
	}
	public boolean getMovingState(){
		return this.moving;
	}
	public boolean getMovingLeft(){
		return this.movingLeft;
	}
	public boolean getMovingRight(){
		return this.movingRight;
	}
	public boolean getMovingUp(){
		return this.movingUp;
	}
	public int getSpeed(){
		return this.speed;
	}
	public boolean getShootingState(){
		return this.canShoot;
	}
	public int getMunitionAmount(){
		return this.munitionAmount;
	}
	
	
	public void setDirection(DIRECTION dir){
		this.dir=dir;
	}
	public void setMovingState(boolean moving){
		this.moving=moving;
	}
	public void setSpeed(int speed){
		this.speed=speed;
	}
	public void setMovingLeft(boolean left){
		this.movingLeft=left;
	}
	public void setMovingRight(boolean right){
		this.movingRight=right;
	}
	public void setMovingUp(boolean up){
		if(!this.isJumping){
			this.jumpAmount = 25;
			this.isJumping = true;
		}

		this.movingUp = up;
	}
	public void setShootingState(boolean shootingState){
		this.canShoot=shootingState;
	}
	public void setMunitionAmount(int munitionAmount){
		this.munitionAmount=munitionAmount;
	}
	
}
